package commands;

import controller.ExecutorsManager;
import controller.ExecutorsManager.AddSharedFolderExecutor;

/**
 * class AddSharedFolderCommand - execute share folder command
 */
public class AddSharedFolderCommand {
	
	AddSharedFolderExecutor addSharedFolderExecutor = ExecutorsManager.getInstance().getAddSharedFolderExecutor();
	
	/**
	 * constructor
	 */
	public AddSharedFolderCommand(){}

	/**
	 * shared the user folder with other user
	 * @param fromUserID - the user that want to share the folder
	 * @param folderName - the folder
	 * @param toUserID - the user that the folder will shared with
	 * @return 1 - if succeed. 0 - if failed.
	 */
	public Integer action(String fromUserID,String folderName, String toUserID)
	{
		return addSharedFolderExecutor.sharedFolder(fromUserID, folderName, toUserID);
	}

}
